<template>
  <user :org-id="orgId" :parent-type="parentType" @add="addUser" @edit="edit" />
</template>

<script>
import User from "../../components/user.vue";
export default {
  components: {
    User,
  },
  computed: {
    orgId() {
      const {
        id
      } = this.$route.params;
      console.log(id + "组织单位id");
      return id;
    },
    parentType() {
      const p = "30";
      return p;
    },
  },
  methods: {
    addUser(id) {
      this.$router.push(`/organization/handle/user/${id}/create`);
    },
    edit(userId) {
      const { id } = this.$route.params;
      this.$router.push(`/organization/handle/user/${id}/edit/${userId}`);
    },
  },
};
</script>
